﻿
@{
    ViewBag.Title = "Welcome";
    Layout = null;
    S4Store.Domain.Administrator CurrentUser = (S4Store.Domain.Administrator)ViewBag.CurrentUser;
}
<div id="lbwarp" style=" width:100%; height:100%; text-align:center; position:relative; vertical-align:middle; background:url(/Resources/project/ohbg.jpg) no-repeat 0 0">
<span class="ctrL"><img src="/Resources/project/ctrL.gif" /></span>
<div class="it01" >
    <a  title="经销商运营健康指标总览"
    @if (
                           CurrentUser.Position == S4Store.Domain.Position.GeneralManager ||
                           CurrentUser.Position == S4Store.Domain.Position.SystemManager ||
                           CurrentUser.Position == S4Store.Domain.Position.MarketingManager ||
                           CurrentUser.Position == S4Store.Domain.Position.SalesManager ||
                           CurrentUser.Position == S4Store.Domain.Position.StoreManager ||
                           CurrentUser.Position == S4Store.Domain.Position.AftersalesManager ||
                           CurrentUser.Position == S4Store.Domain.Position.SaleTutors ||
                           CurrentUser.Position == S4Store.Domain.Position.DealerTutors
                           )
    {
       <text>  target="navtab" href="@Url.Action("Index", "Report")"</text>
    }
    >
    <img src="/Resources/project/01.png" width="262" height="253" />
    </a>
</div>
<div class="it02" >
    <a   title="行动计划"
    @if (
                           CurrentUser.Position == S4Store.Domain.Position.GeneralManager ||
                           CurrentUser.Position == S4Store.Domain.Position.SystemManager ||
                           CurrentUser.Position == S4Store.Domain.Position.MarketingManager ||
                           CurrentUser.Position == S4Store.Domain.Position.SalesManager ||
                           CurrentUser.Position == S4Store.Domain.Position.StoreManager ||
                           CurrentUser.Position == S4Store.Domain.Position.AftersalesManager ||
                           CurrentUser.Position == S4Store.Domain.Position.SaleTutors ||
                           CurrentUser.Position == S4Store.Domain.Position.DealerTutors
                           )
    {
       <text> target="navtab"  href="@Url.Action("Index", "Actionplan")"</text>
    }
    >
    <img src="/Resources/project/02.png" width="166" height="160" />
    </a>
</div>
<div class="it03" >
    <a title="指导改善建议"
    @if (
                          CurrentUser.Position == S4Store.Domain.Position.MarketingManager ||
                           CurrentUser.Position == S4Store.Domain.Position.SalesManager ||
                           CurrentUser.Position == S4Store.Domain.Position.AftersalesManager ||
                            CurrentUser.Position == S4Store.Domain.Position.GeneralManager ||
                           CurrentUser.Position == S4Store.Domain.Position.SystemManager ||
                           CurrentUser.Position == S4Store.Domain.Position.MarketingManager ||
                           CurrentUser.Position == S4Store.Domain.Position.SaleTutors ||
                           CurrentUser.Position == S4Store.Domain.Position.DealerTutors
                           )
    {
       <text>  target="navtab"   href="@Url.Action("Index", "ImproveGuide")"</text>
    }
    ><img src="/Resources/project/03.png" width="104" height="100" /></a></div>
<div class="it04" ><a  href="@Url.Action("Index", "Information")" target="navtab" title="资料下载"><img src="/Resources/project/04.png" width="104" height="100" /></a></div>
<div class="it05" ><a  href="@Url.Action("ModifyPassword", "Administrator")" target="navtab"  title="修改密码"><img src="/Resources/project/05.png" width="166" height="166" /></a></div>
<span class="ctrR"><img src="/Resources/project/ctrR_over.gif" /></span>
<div class="btn">
    <span><img src="/Resources/project/btnCur.png" /></span>
    <span><img src="/Resources/project/btnPoint.png" /></span>
    <span><img src="/Resources/project/btnPoint.png" /></span>
    <span><img src="/Resources/project/btnPoint.png" /></span>
    <span><img src="/Resources/project/btnPoint.png" /></span>
</div>
</div>
<script>
    var items = [
        { width: 262, height: 253, left: "50%", top: "38%", marginLeft: "-131px" },
        { width: 166, height: 160, left: "25%", top: "28%", marginLeft: "-83px" },
        { width: 104, height: 100, left: "40%", top: "20%", marginLeft: "-50px" },
        { width: 104, height: 100, left: "60%", top: "20%", marginLeft: "-50px" },
        { width: 166, height: 160, left: "75%", top: "28%", marginLeft: "-83px" }
    ];
    var currentit = 1;

    $(".ctrL").click(function () {
        currentit += 1;
        if (currentit > 5) currentit = 1;

        for (var i = currentit, n = 0; i < (currentit + 5); i++, n++) {
            var j = i;
            if (j > 5) j = j - 5;
            var item = items[n];
            var o = { top: item.top };
            if (item.left) { o.left = item.left; }
            if (item.marginLeft) { o.marginLeft = item.marginLeft; o.marginRight = 0; }
            var oimg = { width: item.width, height: item.height }
            //alert(j + ":" + itemindex);
            $(".it0" + j).animate(o, 500);
            $(".it0" + j + " img").animate(oimg, 500);
        }
        $(".btn img").attr("src", "/Resources/project/btnPoint.png");
        $(".btn img:eq(" + (currentit - 1) + ")").attr("src", "/Resources/project/btnCur.png");
    });

    $(".ctrR").click(function () {
        currentit -= 1;
        if (currentit < 1) currentit = 5;

        for (var i = currentit, n = 0; i < (currentit + 5); i++, n++) {
            var j = i;
            if (j > 5) j = j - 5;
            var item = items[n];
            var o = { top: item.top };
            if (item.left) { o.left = item.left; }
            if (item.marginLeft) { o.marginLeft = item.marginLeft; o.marginRight = 0; }
            if (item.marginRight) { o.marginRight = item.marginRight; o.marginLeft = 0; }
            var oimg = { width: item.width, height: item.height }
            //alert(j + ":" + itemindex);
            $(".it0" + j).animate(o, 500);
            $(".it0" + j + " img").animate(oimg, 500);
            $(".btn img").attr("src", "/Resources/project/btnPoint.png");
            $(".btn img:eq(" + (currentit-1) + ")").attr("src", "/Resources/project/btnCur.png");
        }
    });


</script>

